package com.leemz.design.chapter7.none;

public class ComputerEngineer {
    private CpuApi cpuApi = null;
    private MainBoardApi mainBoardApi = null;

    public void makeComputer(int cpuType, int mainboardType) {
        prepareHardwares(cpuType, mainboardType);
    }

    public void prepareHardwares(int cpuType, int mainboardType) {
        this.cpuApi = CpuFactory.createCpuApi(cpuType);
        this.mainBoardApi = MainBoardFactory.createMainBoardApi(mainboardType);
        this.cpuApi.calculate();
        this.mainBoardApi.installCpu();
    }
}
